<?php

namespace api\finance\controller;

class AdminMoneyController extends \Aaa\finance\controller\AdminMoneyController {

    public $baseField = [
        [
            'field' => 'id',
            'name' => 'ID',
        ],
        [
            'field' => 'user_id',
            'name' => '用户',
        ],
        [
            'field' => 'bank',
            'name' => '支付平台',
        ],
        [
            'field' => 'amount',
            'name' => '流水',
        ],
        [
            'field' => 'balance',
            'name' => '余额',
        ],
        [
            'field' => 'create_time',
            'name' => '发生时间',
            'type' => 'time',
        ],
        [
            'field' => 'reason',
            'name' => '事由',
        ],
        [
            'field' => 'remark',
            'name' => '备注',
        ],
        [
            'field' => 'editor',
            'name' => '操作人',
        ],
        [
            'field' => 'subsite',
            'name' => '分站',
        ],
    ];

    public function beforeIndex() {
        $this->searchField = [
            'common' => [
                'id' => 'accurate',
                'user_id' => 'accurate',
                'bank' => 'accurate',
                'reason' => 'fuzzy',
                'remark' => 'fuzzy',
                'editor' => 'accurate',
                'subsite' => 'accurate',
            ],
            'time' => ['create_time'],
            'amount' => ['amount', 'balance'],
        ];
    }

}
